package com.jlcindia.spring;

import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Lab25 {
	public static void main(String[] args) {
		ConfigurableApplicationContext ctx=new ClassPathXmlApplicationContext("jlcindia.xml");
		System.out.println("Spring Container is ready...\n");
		//ctx.start();
		JLCManager jlc=(JLCManager)ctx.getBean("jlc");
		System.out.println("getBean() is called...\n");
		Batch b=new Batch("B-24", "28-April-2010", "6.30-8.30", 150);
		jlc.addBatch(b);
		System.out.println("addBatch() called...\n");
		Workshop ws=new Workshop("Web Services", 5000, 99);
		jlc.addWorkshop(ws);
		System.out.println("addWorkshop() called... \n");
		//ctx.stop();
		//ctx.close();
	}
}
